<template>
  <div>
    <wxc-cell label="123"
              title="测试测试"
              :has-arrow="true"
              link="http://192.168.123.109:8081/dist/back.js"
              @wxcCellClicked="wxcCellClicked">

    </wxc-cell>

    <wxc-cell label= "456"
              title= "测试测试测试"
              :has-arrow= "true"
              link= "http://192.168.123.109:8081/dist/back.js"
              @wxcCellClicked= "wxcCellClicked">
    </wxc-cell>

    <wxc-cell   title="自定义样式,label为图标"
                :has-arrow="false"
                :has-top-border="true"
                :cell-style="{backgroundColor: 'pink'}">
      <switch slot="value"></switch>
      <text slot="label" class="image">&#xe932;</text>
    </wxc-cell>
  </div>
</template>

<script type="text/javascript">
  import { WxcCell } from 'weex-ui'
  export default {
    components: {
      WxcCell
    },
    methods: {
      wxcCellClicked (e) {
        console.log(e)
      }
    },
    data () {
      return {

      }
    },
    created () {
      let dom = weex.requireModule('dom')
      let url = "url('//at.alicdn.com/t/font_587502_l6y4kjpecjq93sor.ttf')"
      dom.addRule('fontFace', {
        'fontFamily': 'iconfont2',
        'src': url
      })
    }
  }
</script>

<style scoped>
.image {
  width: 80px;
  height: 80px;
  margin-top: 30px;
  margin-right: 30px;
  font-family: iconfont2;
  font-size:50px;
}
.title {
  font-size: 30px;
  margin-right: 30px;
}
</style>